package com.game.autoTool.project.web.utils;

import java.util.Random;

public class RandomNumberBetweenTwoParams {
    public static int generateRandomNumber(int min, int max) {
        Random random = new Random();
        return random.nextInt(max - min + 1) + min;
    }

    public static void main(String[] args) {
        int min = 10;
        int max = 20;
        int randomNum = generateRandomNumber(min, max);
        System.out.println("生成的 " + min + " 到 " + max + " 之间的随机数是: " + randomNum);
    }
}